import React, { Component } from 'react'

export default class Hello extends Component {
  state = {
    flag: true
  }
  changeFlag = () => {
    this.setState({
      flag: !this.state.flag
    })
  }
  render () {
    const { flag } = this.state
    return (
      <div>
        {
          flag && <img width="100" height="100" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656040970&t=a0ca62a1b796844a68d36c3c819e7656" alt="" />
        }
      </div>
    )
  }
}
